

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>文件解析器信息</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="${ctxPath}/layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="${ctxPath}/layuiadmin/style/admin.css" media="all">
</head>
<body>

  <div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
    </div>
  </div>
  
  <div class="layui-fluid">
    <div class="layui-row layui-col-space15">
      <div class="layui-col-md12">
        <div class="layui-card">
          <div class="layui-card-header">文件解析器信息</div>
          <div class="layui-card-body">
            <table class="layui-hide" id="test-table-data"></table>
            <script type="text/html" id="online-status">
         		{{#  if(d.status == '1'){ }}
            		<button class="layui-btn layui-btn-xs">正常</button>
          		{{#  } else { }}
            		<button class="layui-btn layui-btn-danger layui-btn-xs">禁用</button>
          		{{#  } }}
        	</script>
        	<script type="text/html" id="online-opType">
         		{{#  if(d.opType == 'READ'){ }}
            		<button class="layui-btn layui-btn-xs">读</button>
          		{{#  } else if(d.opType == 'WRITE'){ }}
            		<button class="layui-btn layui-btn-xs">写</button>
				{{#  } else { }}
            		<button class="layui-btn layui-btn-xs">未定义</button>
          		{{#  } }}
        	</script>
        	<script type="text/html" id="online-fileType">
         		{{#  if(d.fileType == 'FIXED'){ }}
            		<button class="layui-btn layui-btn-xs">定长</button>
          		{{#  } else if(d.fileType == 'SEP'){ }}
            		<button class="layui-btn layui-btn-xs">分隔符</button>
				{{#  } else { }}
            		<button class="layui-btn layui-btn-xs">未定义</button>
          		{{#  } }}
        	</script>
        	<script type="text/html" id="online-filecharSet">
         		{{#  if(d.charSet == 'GBK'){ }}
            		<button class="layui-btn layui-btn-xs">GBK</button>
          		{{#  } else if(d.charSet == 'UTF-8'){ }}
            		<button class="layui-btn layui-btn-xs">UTF-8</button>
				{{#  } else { }}
            		<button class="layui-btn layui-btn-xs">未定义</button>
          		{{#  } }}
        	</script>
          </div>
        </div>
      </div>
    </div>
  </div>
  
  <script src="${ctxPath}/layuiadmin/layui/layui.js"></script>  
  <script>
  layui.config({
    base: '${ctxPath}/layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index', 'table'], function(){
    var table = layui.table;
  
    //展示已知数据
    table.render({
      elem: '#test-table-data'
      ,cols: [[ //标题栏
    	  {type: 'numbers'}
	        ,{field:'id', title: 'ID',hide:true, width:80}
	        ,{field:'code', title: '编号', width:120,style:'background-color: #009688; color: #fff;'}
	        ,{field:'name', title: '名称', width:150}
	        ,{field:'handlerCode', title: '文件处理器', width:200}
	        ,{field:'status',title: '状态', width:80, templet:"#online-status"}
	        ,{field:'opType', title: '操作类型', width:100, templet:"#online-opType"}
	        ,{field:'fileType', title: '文件类型', width:100, templet:"#online-fileType"}
	        ,{field:'filePath', title: '文件路径', width:200}
	        ,{field:'fileName', title: '文件名称', width:150}
	        ,{field:'okFileName', title: 'OK文件名称', width:150}
	        ,{field:'sepChar', title: '分隔符', width:100}
	        ,{field:'charSet', title: '字符集', width:100, templet:"#online-filecharSet"}
      ]]
      ,data: ${data}
      //,skin: 'line' //表格风格
      ,even: true
      ,page: true //是否显示分页
      ,limits: [5, 7, 10]
      ,limit: 5 //每页默认显示的数量
    });
    
  });
  </script>
</body>
</html>